package com.spring.cloud.examples;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableConfigServer
public class SpringAuthConfigServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringAuthConfigServerApplication.class, args);
    }

    @RestController
    public class WebController {

        @Value("${eureka_server_prop}")
        private String eureka_server_prop;

        @GetMapping("/eureka_server")
        public String eureka_server() {
            return eureka_server_prop;
        }
    }
}
